home *** CD-ROM | disk | FTP | other *** search
-
- Two Column Printer, Release 5b 4/92
- by Jonathan Corey
-
- Distribution:
- FREEWARE - Please include documentation and printer drivers
- with any copies you give out.
-
- Language:
- GFA BASIC 3.5E
-
- New to Release 5:
- The file README.2CL describes the new features and enhancements in this
- release. The major ones are sorted paper output for cut sheet printers
- and new "Auto" and "passed parameter" modes of operation.
-
-
- INTRODUCTION
-
- * What does it do?
-
- TWO COLUMN PRINTER prints text files (ASCII) in a two column "magazine
- style" format. This saves paper and makes long listings much easier to
- refer to. To save even more paper, it has an option that simplifies two
- sided printing, even on continuous form paper.
-
- TWO COLUMN PRINTER works very well with program documentation, source
- code listings, bulletin board captures, and "online" magazines. It's not
- designed to do fancy desktop publishing work.
-
-
- * What kind of files does it print?
-
- ASCII text files. Basically, these are files that are readable when they
- are displayed by the Desktop SHOW option. TWO COLUMN PRINTER will warn
- you if you ask it to print the wrong kind of file.
-
-
- * Will it work with my printer?
-
- That's likely. Included with Release 5 are drivers for some EPSON,
- PANASONIC and HP Deskjet printers. All but the Deskjets are "Epson
- compatible" and you should be able to get reasonable results using one of
- them with other Epson compatible printers. It is possible to write a
- custom driver for almost any printer. Instructions for this are given
- below.
-
- Your printer should be able to print at least 20 characters per inch
- (CPI) to get the most out of TWO COLUMN PRINTER. Standard printer output
- is usually at 10 or 12 CPI. So called "compressed" print is 17 CPI.
- Compressed type works fairly well but being able to go to 20 CPI gives
- better results with many files. Not all printers can do this.
-
- IMPORTANT: Some printers (such as the Panasonic KX-P1091i and KX-P1191)
- have control panel settings that cannot be changed by software. TWO
- COLUMN PRINTER will not function properly unless they are set to a
- programmable mode (the Panasonic KX-P1091i calls this "Std Pgm", the KX-
- P1191 calls it just "Pgm").
-
-
- * What resolutions does it run in?
-
- I have tried to make TWO COLUMN PRINTER work in all screen resolutions
- (ST/TT/non-standard) but I do not have the hardware to test all possible
- displays. Let me know if you find any that do not work. Don't run it in
- a resolution that displays less than 80 columns of text (e.g. ST low
- resolution) until you are familiar with it since most of its help screens
- won't be readable. The two new "auto" modes of operation should be
- completely resolution independent.
-
-
- * What are its memory requirements?
-
- Given a certain minimum amount of memory, almost any sized file can be
- printed. Just how much memory is this? That depends on when you measure
- it. If you check free memory the first thing after boot up, you will need
- to see about 205K. If you check it after running a program, it's about
- 175K. TWO COLUMN PRINTER will warn you if there isn't enough memory
- available and will show you the amount needed. The two automated modes
- need a little less memory than the normal one since they don't load the
- Resource file.
-
- TWO COLUMN PRINTER works a little differently when free memory is tight
- compared to when its plentiful (relative to the size of the file being
- printed). These differences mainly affect its speed.
-
-
- * How can I change the default settings in the PRINT dialog?
-
- I be uploaded a file to GEnie and Compuserve (2CLRSC.LZH) that contains
- several versions of 2COLUMNS.RSC, each will have the defaults set
- somewhat differently (single vs double sided printing, etc.). The file
- number for this on GEnie is 22488. The definition file for 2COLUMNS.RSC
- was also included with the main release so if you have access to a copy of
- RCR2.PRG you can change them yourself. Just don't do anything that would
- cause a re-sorting of the objects.
-
-
- * Where can I send comments, questions, bug reports, or thousands of
- dollars?
-
- For electronic mail, my GEnie address is JWC-OEO.
-
- For the other kind, write to: Self-Styled Software, 321 J Street, Sparks
- NV 89431.
-
- TWO COLUMN PRINTER is free. No payment is requested.
-
-
-
-
- INSTRUCTIONS
-
- TWO COLUMN PRINTER's normal mode of operation is a simple step-by-step
- process with several HELP options to aid with decisions. Release 5 has
- two new automated modes of operation as well. You'll need to be familiar
- with its normal manual operation before you can use these. See README.2CL
- for information on the automated modes.
-
- You'll find an overview of the program below along with some information
- not covered in the HELP screens. The final section explains how to create
- or modify a printer driver.
-
-
- * Configuration files, 2CL-TP mode, AUTO mode
- See README.2CL
-
-
- * Loading a Printer Driver
-
- After you're satisfied with your printer driver you'll probably want to
- merge it with your copy of 2COLUMNS.PRG. That way, you won't have to load
- it each time 2COLUMNS.PRG is run. You can merge different drivers later
- and can always load alternate drivers from disk. When TWO COLUMN PRINTER
- needs to load a driver from disk it first looks for a file named
- "2COLUMNS.DAT" in the same folder as the program. It loads this auto-
- matically if it finds it, otherwise it prompts you for the name of the
- driver. You'll probably want to use a descriptive name (e.g.EPSON_FX.DAT)
- for the driver you merge with 2COLUMNS.PRG and save the use of the name
- "2COLUMNS.DAT" for an alternate driver.
-
- There is a short section at the end of this file that gives some more
- information on merging printer drivers with 2COLUMNS.PRG.
-
-
- * File Preview (plus Tabs & Blank Line Filtering)
-
- The File Preview option serves several functions. Besides letting you see
- the file you will be printing, it lets you strip any embedded left margin
- in the file, adjust the tab settings, and adjust the blank line filter.
-
- TWO COLUMN PRINTER supports true tabs (a tab will cause printing to skip
- to the next tab stop instead of being expanded into a constant number of
- spaces). Tab spacing is adjustable here but only regular tab spacing is
- supported.
-
- The blank line filter limits the number of consecutive blank lines in a
- row that print. It's preset to 2 but can be adjusted here. Setting a
- value of zero disables the blank line filter.
-
- The file display reflects the current tab setting but will not show blank
- line filtering or left margin shifting.
-
-
- * Format Method
-
- Sometimes file lines are too long to fit in a column. TWO COLUMN PRINTER
- splits off the part that doesn't fit and moves it to the next line in the
- column when this happens. The "format method" determines exactly where
- this split occurs, if and how it's marked, and whether this runover can be
- combined with the next line in the file. A program "HELP" option explains
- the different format methods and the types of files recommended for each.
-
- Split line marking is done in different ways with each of the three
- different format methods. With the "Source Code" method all split lines
- end with these three characters; ``> . Continuation lines all begin with;
- >`` . With the "Text, No Reformat" method, the ends of split lines are
- not marked unless the splits have to occur in the middle of words; the
- words get hyphenated in this case. Continuation lines begin with a tilde
- (~). If splits fall between numbers instead of letters, a vertical bar
- (|) is used in both places to avoid the possibility of a hyphen being
- mistaken for a minus sign. The "Text, With Reformat" method works the
- same way as "No Reformat" except continuation lines are marked only in
- the "|" case.
-
- The different format methods only come into play when file lines are too
- long to fit a printed column. It is usually best to choose a type size
- that will allow most, if not all, file lines to be printed without
- splitting.
-
-
- * Fonts
-
- The term "font" here refers to a particular grouping of type face, size,
- pitch, and sometimes line spacing. You can have up to 6 different fonts
- in your printer driver.
-
-
- * Column Dimensions
-
- TWO COLUMN PRINTER calculates the maximum column WIDTH for each font from
- information supplied in the printer driver (the entry for the number of
- characters that will fit on a full line).
-
- The maximum column LENGTH comes directly from the printer driver.
- Printers vary in how close they can print to the top and bottom of a page
- so maximum column length is not a direct function of line spacing and
- paper length. The section on printer codes below explains how to figure
- maximum column lengths for your printer.
-
- The values that first appear in the boxes from which you set column
- dimensions usually will be a little smaller than they could be. With
- column widths, this is done because using widths a little shorter than the
- maximum leaves room on the sheet for binding. With column length this a
- safety factor to help avoid having a column run beyond the bottom of a
- sheet or having the printer loose its grip on the last sheet. The section
- on printer drivers shows a method for changing the default column length
- setting.
-
-
- * Line Spacing
-
- Line spacing is not set explicitly. The default spacing is usually 7
- lines per inch (LPI); this normally shifts to 6 LPI when a column length
- of less than 61 lines is chosen. Any line spacing codes included as part
- of a font's definition will override these settings. Several fonts that
- come with TWO COLUMN PRINTER use this method to set a spacing of 8 LPI.
-
-
- * BINDING WIDTH
-
- TWO COLUMN PRINTER tries to offset the margins to the outside of the
- sheets to make room for binding. There is room for this only when column
- widths are set smaller than their maximum size.
-
-
- * Print Options
-
- Manual vs. Automatic/normal vs. Automatic/sorted paper feed -
-
- MANUAL FEED: There is a pause between pages and you'll be get a chance
- to skip each page. This lets you go back and fix a page or two that may
- have gotten messed up the first time around without having to reprint the
- whole file. Pages always print sequentially even when the Two Sided
- print option was chosen. You cannot print to a disk file with manual
- feed. Manual feed does not work in either of the automated modes of
- operation.
-
- AUTOMATIC FEED (Normal): With Two Sided printing, the pages come out odd
- then even (first 1,3,5 . . . then 1,4,6 . . . ). The only pause comes
- between sides. Use this with continuous form paper.
-
- AUTOMATIC FEED (Sorted): Like "Normal" except the first side comes out in
- reverse order (...5,3,1 if two sided or ...6,5,4,3,2,1 if single sided).
- This keeps users of HP DeskJets and other printers that use cut sheets
- from having to resort them from top to bottom.
-
- Print To Disk - This is useful when you want to print several files in a
- single session or have one very large one to do. Printing to disk
- creates a file (or files) that can be printed later via the Desktop PRINT
- option (and also can be printed on different model computers). A print
- spooler can be used. If the file does not print correctly, it is usually
- because you used a method that filtered out the control characters. Front
- and back sides of two sided printouts go into separate files. Be careful
- not to mix one and two sided printouts in the same output file.
-
-
-
- *************************************************************
- *************** Printer Codes and Drivers ***************
- *************************************************************
-
-
- Printer Drivers Supplied with Release 5
-
- New: There have been no changes to the format of the printer drivers with
- this release but you can now set columns to be up to 125 lines long (old
- max was 99) and the blank-line-filter can now range from 0 to 9 (0
- disables it, old range was 1-9). I have added some "long column" fonts to
- most of the supplied drivers. Drop me a note if you need a version of TWO
- COLUMN PRINTER that can do columns that are longer than 125 lines. The
- limit comes from the "low memory" operation mode which does its formatting
- 250 lines at a time.
-
- TWO COLUMN PRINTER now sends the "initialize printer" sequence at the end
- of each print job to return the printer to its normal settings. This may
- cause an extra form feed on some printers but so many people asked for a
- printer reset that I included it anyway.
-
- Several printer drivers are included. If your printer is "Epson
- compatible" (or you have an HP Deskjet) then one of them should work
- reasonably well. If not, you'll need to do some editing. See the next
- section for instructions.
-
- All these drivers are set up for printing on 8 1/2 x 11 inch paper. You
- can make a driver for other sizes if you want.
-
- The various "Epson compatible" printer drivers are designed for their
- "Standard Mode". If your printer's DIP switches are set to the IBM mode,
- you'll need to modify the codes or change the switches (the Epson mode is
- recommended since 20 CPI type may not be possible in IBM mode).
-
- The Epson-FX codes were developed on a FX-85. They have also been tested
- on an Epson LX-800 and FX-80 and work quit well (some fonts are not
- available on the FX-80). The LQ codes were developed on an Epson
- LQ-1050. Some earlier Epson LQ printers (such as the LQ-1500) cannot do
- NLQ with type sizes smaller than 12 characters per inch (CPI). Double
- strike should be used instead of NLQ for "enhanced print" with these
- printers (necessary codes for this are shown in the remarks section of
- this driver).
-
- Two Panasonic drivers (Epson compatible) are included; one is for the
- KX-P1091i and the other for the KX-P1191. The main difference between
- the two is that the latter can do 20 CPI printing. The KX-P1191 driver
- would likely work well with an Epson FX-86e although I haven't tested
- this.
-
- There are three HP Deskjet drivers: "BASIC" uses the built in Courier
- font and should work with any Deskjet model; "500" is similar but adds a
- 6 point and a 12 point Letter Gothic font (standard on the Deskjet 500);
- "GOTHIC" primarily uses the 9.5 point font found on the Letter Gothic
- cartridge (this is the one I use).
-
-
- EDITING A PRINTER DRIVER
-
- Read the sections on line spacing and column dimensions above if you
- haven't already done so.
-
-
- Getting Started
-
- You'll need your printer manual. Edit one of the supplied drivers.
- Follow its format exactly. Give your driver a new name and save it as a
- text file (ASCII format, not in any special word processor mode). It's a
- good idea to use a descriptive name for the driver if it's to be merged
- with the program. Use the 2COLUMNS.DAT option for alternative drivers.
-
- The codes and the remarks that follow must fit on a single line. Each
- line can be up to 255 characters long. The number of codes allowed
- varies with the function. See below.
-
- Use 3 digit decimal ASCII values for printer codes. Separate them with a
- single space and put a comma after the last one. Remarks may follow the
- comma (the comma is mandatory, the remarks are optional). THERE CANNOT BE
- ANY OTHER COMMAS IN THE DATA SECTION, including in the remarks themselves.
- The "-----CODES AND DEFAULTS----" line must be left intact.
-
- Example: A printer function that requires the code "Escape A" would be
- encoded as:
-
- 027 065, REMARKS
-
- (the ASCII value of Escape is 27, that of A is 65). Again, no commas are
- allowed in the remarks themselves.
-
- If your printer requires ASCII 238, 239, or 240 as code values
- (unlikely), see the section below on merging printer codes.
-
- Printer functions may require a combination of several codes. In the
- Epson FX driver, the "definition" for type size #2 includes both the
- codes for both compressed type ( 027 015 ) and for wider margins with
- this type size ( 027 081 137 ).
-
-
-
- Line-By-Line Editing Instructions
-
- (*) The number in parentheses following each code type below is the
- maximum number of code groups allowed for it. A code group is one three
- character ASCII value ( "027 081 137 009" would count as 4 ). These
- limits only apply to codes that will be merged with the program.
-
-
- Defaults line
-
- This line lets you set the maximum number of consecutive blank lines that
- will print, the spacing of tab stops, and the default column length. This
- line comes before the "---CODES AND DEFAULTS---" line and begins with a
- dollar sign instead of an asterisks. All that's needed on this line is:
- $ MB=x, TS=x, CL=x (where "x" is the value you want).
-
- MB is the default Max Blank line setting and can range from 0-9, TS is
- the Tab Spacing and can range from 2-9, CL is for the default Column
- Length. Enter the number you want subtracted from the maximum column
- length for each font; range 0-9. See any of the printer drivers for an
- example.
-
-
- Paper-Out Sensor (20)*
-
- The first two entries in the "CODES AND DEFAULTS" section are:
- 1) Disable (turn off) the paper-out sensor, and 2) Enable (turn on) the
- paper-out sensor. If your printer does not allow its paper-out sensor to
- be turned off, just enter a single blank space followed by a comma (see
- the drivers for the HP Deskjet).
-
-
- Line Spacing (20)
-
- Next enter the codes for a line spacing of 7 lines per inch. You may
- find that you can only use a value equivalent to slightly more or
- slightly less than this (7 lines per inch is a spacing of 0.143 inches).
- In this case choose the next smallest value available. For example, the
- Epson-FX definition uses 10/72 (0.139) inch spacing.
-
-
- Printer Initialization (35)
-
- Certain settings have to be in effect before printing begins. These
- initial conditions are: A pitch of 10 characters per inch (CPI); Draft
- print; 6 lines per inch line spacing; and top-of-form reset. These are
- the standard "power up" settings for most printers. TWO COLUMN PRINTER
- sends an "initialize" sequence to ensure that these conditions are met.
- The codes that are needed in this sequence vary somewhat from printer to
- printer and also depend on how you normally have your printer's DIP
- switches and control panel buttons set.
-
- As a minimum, you should include: "Reset Printer" (also called
- "Initialize Printer"); 10 CPI printing; and draft mode.
-
- Unless you have your printer's DIP switch set at 8 lines per inch you
- probably don't need to set 6 lines per inch.
-
- If you use the Super/Sub script font for one of your type sizes, you also
- need to add the codes to cancel this font to the "initialize printer"
- sequence. The Epson FX driver does this.
-
- There are some other codes in the "initialize" sequence for the Deskjet,
- see the note at the bottom of one of the DJ drivers.
-
-
- Skip-Over-Perforations (20)
-
- Enter the codes to turn OFF your printer's "skip-over-perforations"
- function. TWO COLUMN PRINTER handles page breaks itself. Output will be
- totally messed up if "skip-over-perforations" is not turned off.
-
-
- Fancy Print for the Heading (20)
-
- TWO COLUMN PRINTER puts a heading consisting of the name of the file
- being printed (and optionally the current date) on the first printed
- page. For this to print properly you'll need to enter the codes for
- Double Width (expanded/5 CPI) printing here. The heading will not be
- centered if you don't.
-
-
- Enhanced Print (20)
-
- Use either Letter Quality (LQ), Near Letter Quality (NLQ) or double
- strike printing. Ideally, your "enhance print" codes should work with
- all the fonts in your driver. Some printers can't do LQ/NLQ with the
- small type sizes that work best with TWO COLUMN PRINTER.
-
-
- Default Extension
-
- Only files with this extension show up in the File Selector the first
- time you're prompted for a file to print. This entry cannot exceed three
- characters and must be surrounded by quotes. If you prefer that all files
- are shown, enter "*" or just "" here (don't forget the comma).
-
-
- Number of Type Sizes/fonts
-
- Six is the maximum, there can be fewer. Make sure the number you enter
- here is not larger than the number of fonts in your driver.
-
-
- Entries for Each Font (35 for font definitions)
-
- ****==> Proportionally spaced fonts will not work <==****
-
- Name
- The name of each font cannot exceed 25 characters. Put whatever
- descriptive information you like here, surround it by quotation marks.
- Like all other entries the name MUST be followed by a comma and optional
- descriptive remarks may follow the comma.
-
- Definition (35)
- This is where you put the codes that actually set the font. You are
- limited to 35 codes (see above) if you will be merging a driver with the
- program.
-
- Width
- The entry for the number of characters that will fit on a full line is
- mandatory. Get this value from your printer manual if possible
- (sometimes given as the maximum value allowed for the right margin). If
- you can't find it there then try 160 for 20 CPI, 136 for 17 CPI, 120 for
- 15 CPI, 96 for 12 CPI, and 80 for 10 CPI. Arithmetically inclined
- individuals will be able to discern a pattern here. These values are for
- narrow carriage printers. If you are using a wide carriage model you
- probably can add a character or two to them.
-
- Length (optional)
- On the next line you may enter a number equal to the maximum column
- length possible with this font (up to 125). This optional entry is useful
- if the font's definition includes a line spacing (say 8 lines per inch),
- if your printer can fit more or cannot reliably get as many lines in a
- column as the default (72 lines), or if you will be using something other
- than 11 inch paper. Like all entries, it must be followed by a comma and
- remarks may follow the comma.
-
-
- Maximum Column Length
-
- How do you know exactly how many lines long that columns can be with YOUR
- printer? This depends on two things. 1) Line spacing, and 2) How close
- to the top and bottom of the page your printer can print.
-
- Included in Release 5 is a test file (LPC_TEST) that can help you
- determine this. You can set any column length up to 125 with this file no
- matter what limits are defined in your driver. You must select the
- "Unequal-Column-Length" print option for the test to work. You also must
- use the version of LPC_TEST that comes with Release 5.
-
- You'll probably find that you can't get quite as many lines on cut sheets
- as on continuous form paper since your printer will loose its grip near
- the end of a cut sheet. The last sheet in a two sided printout will be a
- cut sheet so the smaller value may be the best choice.
-
- IMPORTANT: If your printer will not allow its paper-out sensor to be
- deactivated (like the HP Deskjet and Epson LQ-850/1050 series) then you
- MUST choose a value one less than the maximum column length indicated by
- this test. If a new sheet of paper loads after printing LPC_TEST, your
- columns are too long.
-
- If you don't want to do this test, use the following values: For the
- program standard line spacing of 7 lines per inch; use 72 lines (this is
- the default). For fonts that use an 8 line per inch spacing; use 82 or 83
- lines.
-
-
-
- MERGING PRINTER CODES WITH 2COLUMNS.PRG
-
- Whenever you load a printer driver from disk you'll get a chance to merge
- it with 2COLUMNS.PRG. 2COLUMNS.PRG loads more quickly after this is done
- and you can then move your printer driver to your archives. You can
- always load alternative drivers from disk and merger other drivers later.
-
- The copy of 2COLUMN.PRG that you merge codes with must be in its original
- form. It can't have been "squished" or "packed". It will run OK after
- having been magically shrunk this way, you just can't merge printer codes
- with a copy that is not full sized.
-
- Printer drivers that use the decimal ASCII values 237, 238, or 240 for
- codes WILL NOT work properly after they have been merged. I don't think
- this will be a problem for anyone, but let me know if I'm wrong. I can
- supply a version that will work with them.
-